package com.itheima.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;
import java.util.Date;

@Data
@TableName("ad_channel")
@ApiModel(description = "频道实体")
public class AdChannel {

    @ApiModelProperty(notes = "主键id")
    @TableId(value = "id" , type = IdType.AUTO)
    private Integer id;

    @Size(min = 1,max = 10,message = "频道名称不能超过10个字")
    @ApiModelProperty(notes = "频道名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(notes = "频道描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(notes = "是否默认频道")
    @TableField("is_default")
    private Boolean asDefault;

    @ApiModelProperty(notes = "状态")
    @TableField("status")
    private Boolean status;

    @ApiModelProperty(notes = "默认排序")
    @TableField("ord")
    private Integer ord;

    @ApiModelProperty(notes = "创建时间")
    @TableField("created_time")
    private Date createdTime;

}
